import App from './App'
import Vue from 'vue'
import './uni.promisify.adaptor' //uni.promisify.adaptor.js 文件主要用于将小程序原生 API 的回调风格转换为 Promise 风格
Vue.config.productionTip = false // 阻止 vue 在启动时生成生产提示
App.mpType = 'app' //表示当前运行的是原生应用程序
/**
 * qwJssdk 接入企业微信方法集合
 * wxJssdk 接入个人微信方法集合
 * config 配置公共参数等
 * constant 配置常量
 * functions 绑定项目常用方法
 * filters 全局过滤方法
 * directives 全局指令方法
 * uView UI框架
 * mixins mixins混入
 * onLaunched 让页面的 onLoad 在 onLaunch 之后执行
 */
import qwJssdk from '@/utils/qw-jssdk.js'
import wxJssdk from '@/utils/wx-jssdk.js'
import config from '@/utils/config/config.js'
import constant from '@/utils/constant/constant.js'
import functions from "@/utils/functions/functions.js"
import filters from '@/utils/filters/filters.js'
import directives from '@/utils/directives/directives.js'
import uView from '@/uni_modules/uview-ui'
import mixins from '@/utils/mixins/mixins.js'
import * as echarts from 'echarts';
import * as ww from '@wecom/jssdk'
// import '@/utils/onLaunched.js'

let capsule = {
	top: 15,
	height: 32
}
// #ifdef MP-WEIXIN
capsule = uni.getMenuButtonBoundingClientRect()
// #endif


/**
 * 过载方法
 */
Vue.use(uView)
Vue.mixin(mixins)
filters(Vue)
directives(Vue)
Vue.prototype.$fn = functions
Vue.prototype.$config = config
Vue.prototype.$wxJssdk = wxJssdk
Vue.prototype.$qwJssdk = qwJssdk
Vue.prototype.$constant = constant
Vue.prototype.$capsule = capsule
Vue.prototype.$echarts = echarts
Vue.prototype.$ww = ww
Vue.prototype.$onLaunched = new Promise(resolve => {
	Vue.prototype.$isResolve = resolve
})
const app = new Vue({
	...App
})
app.$mount()